(function (window) {
    function Battery(x, y, voltage, texture) {
        this.x = x;
        this.y = y;
        this.voltage = voltage;
        this.texture = texture;
        this.initialize(x, y, voltage, texture);
    }

    Battery.prototype = new Bitmap();
    Battery.prototype.Bitmap_initialize = Battery.prototype.initialize;

    Battery.prototype.initialize = function (x, y, voltage, texture) {
        if (texture != null) {
            this.Bitmap_initialize(texture);
            this.empty = false;
        } else {
            this.empty = true;
        }

        this.x = x;
        this.y = y;
    }
    window.Battery = Battery;
} (window));